home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / libpaper1.postinst < prev    next >
Text File  |  2008-06-19  |  1KB  |  49 lines

  1. #! /bin/sh -e
  2.  
  3. . /usr/share/debconf/confmodule
  4.  
  5. # Automatically added by dh_makeshlibs
  6. if [ "$1" = "configure" ]; then
  7.     ldconfig
  8. fi
  9. # End automatically added section
  10.  
  11.  
  12. #case "$1" in
  13. #configure)
  14. #    if [ ! -e /etc/papersize ]; then
  15. #    if db_get libpaper/defaultpaper; then
  16. #        echo $RET > /etc/papersize
  17. #    fi
  18. #    fi
  19. #;;
  20. #esac
  21.  
  22. if [ "$1" ]; then
  23.  db_get libpaper/defaultpaper
  24.  echo $RET > /etc/papersize.dpkg-inst
  25.  # it is okay if /etc/papersize does not exist
  26.  md5_old=`md5sum /etc/papersize 2> /dev/null | awk '{print $1}'`
  27.  md5_inst=`md5sum /etc/papersize.dpkg-inst | awk '{print $1}'`
  28.  ucf --debconf-ok /etc/papersize.dpkg-inst /etc/papersize
  29.  md5_new=`md5sum /etc/papersize 2> /dev/null | awk '{print $1}'`
  30.  
  31.  # if papersize changed, run hooks
  32.  if [ "$md5_old" != "$md5_new" ]; then
  33.   if [ -d /etc/libpaper.d ]; then
  34.    run-parts /etc/libpaper.d
  35.   fi
  36.  fi
  37.  
  38.  # cleanup clutter
  39.  
  40.  if [ -e /etc/papersize.dpkg-inst ]; then
  41.   if [ "$md5_inst" = "$md5_new" ]; then
  42.    rm -f /etc/papersize.dpkg-inst
  43.   fi
  44.  fi
  45. fi
  46.  
  47. exit 0
  48.  
  49.